/**
 * Copyright (c) 2006 RiseSoft Co.,Ltd  
 * $Header$
 */
package cn.newtest.bi.collection.model;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 *
 * @author <a href="mailto: chenjian@risesoft.net">陈健</a>
 * @version $Revision$
 * 
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Table(name="rpt_eventlistener")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class EventListener implements Serializable {

	private static final long serialVersionUID = -4801077572461044599L;
	
	public static final int LANGUAGE_JAVA = 1;
	public static final int LANGUAGE_GROOVY = 2;
	
	@Id
	@Column(name="Listener_GUID",length=38)
	@GenericGenerator(name="EventListener-assigned",strategy="assigned")
	private String guid;
	
	@Column(name="Listener_Name",length=50,nullable=false)
	private String name;
	
	@Column(name="Listener_Description",length=200)
	private String description;
	
	@Column(name="Listener_Language")
	private Integer language;
	
	@Lob
	@Column(name="Listener_Content")
	private String content;
	
	@Column(name="Listener_Enabled")
	private Boolean enabled;
	
	@Column(length=500,nullable=false)
	private String eventNames;
	
	@Basic
	private Double tabIndex;
	
	public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public Integer getLanguage() {
		return language;
	}
	public void setLanguage(Integer language) {
		this.language = language;
	}
	
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	public Boolean getEnabled() {
		return enabled;
	}
	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
	
	public String getEventNames() {
		return eventNames;
	}
	public void setEventNames(String eventNames) {
		this.eventNames = eventNames;
	}
	
	public Double getTabIndex() {
		return tabIndex;
	}
	public void setTabIndex(Double tabIndex) {
		this.tabIndex = tabIndex;
	}
}
